import servers from '@/utils/servers'
// 获取文章评论
export const getComments = params => {
  return servers({
    url: '/v1_0/comments',
    params
  })
}
// 对文章进行评论
export const addComment = data => {
  return servers({
    url: '/v1_0/comments',
    method: 'POST',
    data
  })
}
// 对评论点赞
export const addCommentLike = data => {
  return servers({
    url: '/v1_0/comment/likings',
    method: 'POST',
    data
  })
}
// 对评论取消点赞
export const removeCommentLike = target => {
  return servers({
    url: `/v1_0/comment/likings/${target}`,
    method: 'DELETE'
  })
}
